// eslint-disable-next-line
import { BasicLayout, UserLayout } from '@/layouts'
import { bxAnaalyse } from '@/core/icons'

const RouteView = {
  name: 'RouteView',
  render: h => h('router-view')
}

export const asyncRouterMap = [
  {
    path: '/',
    name: 'index',
    component: BasicLayout,
    meta: { title: '首页' },
    redirect: '/dashboard/control',
    children: [
      // dashboard
      {
        path: '/dashboard/control',
        name: 'control',
        component: () => import('@/views/dashboard/control'),
        meta: { title: '控制台', icon: bxAnaalyse, permission: ['control'] }
      },
      {
        path: '/admin/dashboard/dashboard',
        name: 'dashboard',
        component: () => import('@/views/admin/dashboard/dashboard'),
        meta: { title: '控制台', icon: bxAnaalyse, permission: ['control'] }
      },
      {
        path: '/activity',
        name: 'activity',
        redirect: '/activity/public',
        component: RouteView,
        meta: { title: '活动管理', keepAlive: true, icon: 'smile', permission: ['activity'] },
        children: [
          {
            path: '/activity/public',
            name: 'public',
            hideChildrenInMenu: true,
            component: () => import('@/views/activity/public'),
            meta: { title: '公用活动', hideHeader: true, icon: 'smile', keepAlive: false, permission: ['public'] },
            children: [
              {
                path: '/activity/public/audit',
                name: 'audit',
                component: () => import('@/views/activity/audit'),
                meta: { title: '审核商品', hidden: true, keepAlive: false, icon: 'smile', permission: ['public'] }
              }
            ]
          },
          {
            path: '/activity/myActivity',
            name: 'myActivity',
            hideChildrenInMenu: true,
            component: () => import('@/views/activity/myActivity'),
            meta: { title: '我的活动', hideHeader: true, keepAlive: false, icon: 'smile', permission: ['myActivity'] },
            children: [
              {
                path: '/activity/myActivity/myAudit',
                name: 'myAudit',
                component: () => import('@/views/activity/myAudit'),
                meta: { title: '审核商品', hidden: true, keepAlive: false, icon: 'smile', permission: ['myActivity'] }
              }
            ]
          }
        ]
      },
      {
        path: '/goods',
        name: 'goods',
        redirect: '/goods/goodsList',
        component: RouteView,
        meta: { title: '商品管理', keepAlive: true, icon: 'smile', permission: ['goods'] },
        children: [
          {
            path: '/goods/goodsList',
            name: 'goodsList',
            // hidden: true,
            component: () => import('@/views/goods/goodsList'),
            meta: { title: '商品列表', icon: 'smile', keepAlive: false, permission: ['goodsList'] }
          },
          {
            path: '/goods/goodsIssue',
            name: 'goodsIssue',
            // hidden: true,
            component: () => import('@/views/goods/goodsIssue'),
            meta: { title: '商品出单', keepAlive: false, icon: 'smile', permission: ['goodsIssue'] }
          }
        ]
      },
      {
        path: '/attractinvest',
        name: 'attractinvest',
        redirect: '/attractinvest/entering',
        component: RouteView,
        meta: { title: '招商管理', keepAlive: true, icon: 'smile', permission: ['attractinvest'] },
        children: [
          {
            path: '/attractinvest/entering',
            name: 'entering',
            // hidden: true,
            component: () => import('@/views/attractinvest/entering'),
            meta: { title: '招商录入', icon: 'smile', keepAlive: false, permission: ['entering'] }
          },
          {
            path: '/attractinvest/supervise',
            name: 'supervise',
            // hidden: true,
            hideChildrenInMenu: true,
            component: () => import('@/views/attractinvest/supervise'),
            meta: { title: '商品管理', hideHeader: true, icon: 'smile', keepAlive: false, permission: ['supervise'] },
            children: [
              {
                path: '/attractinvest/supervise/typeinManage',
                name: 'typeinManage',
                component: () => import('@/views/attractinvest/typeinManage'),
                meta: { title: '录入管理', hidden: true, keepAlive: false, icon: 'smile', permission: ['supervise'] }
              }
            ]
          }
        ]
      },
      {
        path: '/firstgifts',
        name: 'firstgifts',
        redirect: '/firstgifts/entering',
        component: RouteView,
        meta: { title: '首单礼金', keepAlive: true, icon: 'smile', permission: ['firstgifts'] },
        children: [
          {
            path: '/firstgifts/fentering',
            name: 'fentering',
            // hidden: true,
            component: () => import('@/views/firstgifts/fentering'),
            meta: { title: '礼金录入', icon: 'smile', keepAlive: false, permission: ['fentering'] }
          },
          {
            path: '/firstgifts/goodsManage',
            name: 'goodsManage',
            // hidden: true,
            hideChildrenInMenu: true,
            component: () => import('@/views/firstgifts/goodsManage'),
            meta: { title: '商品管理', hideHeader: true, icon: 'smile', keepAlive: false, permission: ['goodsManage'] },
            children: [
              {
                path: '/firstgifts/goodsManage/editGoods',
                name: 'editGoods',
                component: () => import('@/views/firstgifts/editGoods'),
                meta: { title: '修改商品', hidden: true, keepAlive: false, icon: 'smile', permission: ['goodsManage'] }
              }
            ]
          }
        ]
      },
      {
        path: '/achievement',
        name: 'achievement',
        redirect: '/achievement/myAchieve',
        component: RouteView,
        meta: { title: '业绩查询', keepAlive: true, icon: 'smile', permission: ['achievement'] },
        children: [
          {
            path: '/achievement/myAchieve',
            name: 'myAchieve',
            // hidden: true,
            component: () => import('@/views/achievement/myAchieve'),
            meta: { title: '个人业绩', icon: 'smile', keepAlive: false, permission: ['myAchieve'] }
          }
        ]
      },
      {
        path: '/widget',
        name: 'widget',
        redirect: '/widget/makeSpreadimg',
        component: RouteView,
        meta: { title: '小工具箱', keepAlive: true, icon: 'smile', permission: ['widget'] },
        children: [
          {
            path: '/widget/makeSpreadimg',
            name: 'makeSpreadimg',
            // hidden: true,
            component: () => import('@/views/widget/makeSpreadimg'),
            meta: { title: '做营销图', icon: 'smile', keepAlive: false, permission: ['makeSpreadimg'] }
          },
          {
            path: '/widget/referCommi',
            name: 'referCommi',
            // hidden: true,
            component: () => import('@/views/widget/referCommi'),
            meta: { title: '佣金查询', icon: 'smile', keepAlive: false, permission: ['referCommi'] }
          },
          {
            path: '/widget/brushCoupon',
            name: 'brushCoupon',
            // hidden: true,
            component: () => import('@/views/widget/brushCoupon'),
            meta: { title: '刷优惠券', icon: 'smile', keepAlive: false, permission: ['brushCoupon'] }
          }
        ]
      },
      {
        path: '/virtual',
        name: 'virtual',
        redirect: '/virtual/screenshot',
        component: RouteView,
        meta: { title: '虚拟截图', keepAlive: true, icon: 'smile', permission: ['virtual'] },
        children: [
          {
            path: '/virtual/screenshot',
            name: 'screenshot',
            // hidden: true,
            component: () => import('@/views/virtual/screenshot'),
            meta: { title: '推广效果', icon: 'smile', keepAlive: false, permission: ['screenshot'] }
          },
          {
            path: '/virtual/apply',
            name: 'apply',
            // hidden: true,
            component: () => import('@/views/virtual/apply'),
            meta: { title: '商品报名', icon: 'smile', keepAlive: false, permission: ['apply'] }
          },
          {
            path: '/virtual/coupon',
            name: 'coupon',
            // hidden: true,
            component: () => import('@/views/virtual/coupon'),
            meta: { title: '优惠券　', icon: 'smile', keepAlive: false, permission: ['coupon'] }
          },
          {
            path: '/virtual/backissue',
            name: 'backissue',
            // hidden: true,
            component: () => import('@/views/virtual/backIssue'),
            meta: { title: '后台出单', icon: 'smile', keepAlive: false, permission: ['backissue'] }
          },
          {
            path: '/virtual/activity',
            name: 'vactivity',
            // hidden: true,
            component: () => import('@/views/virtual/activity'),
            meta: { title: '活动列表', icon: 'smile', keepAlive: false, permission: ['vactivity'] }
          }
        ]
      },
      {
        path: '/reimbursement',
        name: 'reimbursement',
        redirect: '/reimbursement/offlineCollection',
        component: RouteView,
        meta: { title: '收款报销', keepAlive: true, icon: 'smile', permission: ['reimbursement'] },
        children: [
          {
            path: '/reimbursement/offlineCollection',
            name: 'offlineCollection',
            // hidden: true,
            hideChildrenInMenu: true,
            component: () => import('@/views/reimbursement/offlineCollection'),
            meta: {
              title: '线下收款',
              icon: 'smile',
              hideHeader: true,
              keepAlive: false,
              permission: ['offlineCollection']
            },
            children: [
              {
                path: '/reimbursement/offlineCollection/collection',
                name: 'collection',
                component: () => import('@/views/reimbursement/collection'),
                meta: {
                  title: '提交收款',
                  hidden: true,
                  keepAlive: false,
                  icon: 'smile',
                  permission: ['offlineCollection']
                }
              }
            ]
          },
          {
            path: '/reimbursement/finance',
            name: 'finance',
            component: () => import('@/views/reimbursement/finance'),
            meta: { title: '财务报销', icon: 'smile', keepAlive: false, permission: ['finance'] }
          },
          {
            path: '/reimbursement/newShop',
            name: 'newShop',
            component: () => import('@/views/reimbursement/newShop'),
            meta: { title: '新店申请', icon: 'smile', keepAlive: false, permission: ['newShop'] }
          }
        ]
      },
      {
        path: '/docking',
        name: 'docking',
        redirect: '/docking/getSample',
        component: RouteView,
        meta: { title: '对接表格', keepAlive: true, icon: 'smile', permission: ['docking'] },
        children: [
          {
            path: '/docking/getSample',
            name: 'getSample',
            component: () => import('@/views/docking/getSample'),
            meta: { title: '商品寄样', icon: 'smile', keepAlive: false, permission: ['getSample'] }
          },
          {
            path: '/docking/tiktokOpening',
            name: 'tiktokOpening',
            component: () => import('@/views/docking/tiktokOpening'),
            meta: { title: '抖音橱窗', icon: 'smile', keepAlive: false, permission: ['tiktokOpening'] }
          },
          {
            path: '/docking/taoGifts',
            name: 'taoGifts',
            component: () => import('@/views/docking/taoGifts'),
            meta: { title: '淘礼金　', icon: 'smile', keepAlive: false, permission: ['taoGifts'] }
          }
        ]
      },
      {
        path: '/knowledgecase',
        name: 'knowledgecase',
        redirect: '/knowledgecase/index',
        component: RouteView,
        meta: { title: '知识案例', keepAlive: true, icon: 'smile', permission: ['knowledgecase'] },
        children: [
          {
            path: '/knowledgecase/index',
            name: 'knowindex',
            hideChildrenInMenu: true,
            redirect: '/knowledgecase/index/kbase',
            component: () => import('@/views/knowledgecase/index'),
            meta: { title: '知识问答', icon: 'smile', hideHeader: true, keepAlive: false, permission: ['knowindex'] },
            children: [
              {
                path: '/knowledgecase/index/kbase',
                name: 'kbase',
                component: () => import('@/views/knowledgecase/kbase'),
                meta: { title: '知识库', hidden: true, keepAlive: false, icon: 'smile', permission: ['knowindex'] }
              },
              {
                path: '/knowledgecase/index/questionList',
                name: 'questionList',
                component: () => import('@/views/knowledgecase/questionList'),
                meta: { title: '问题列表', hidden: true, keepAlive: false, icon: 'smile', permission: ['knowindex'] }
              },
              {
                path: '/knowledgecase/index/questionDetails',
                name: 'questionDetails',
                component: () => import('@/views/knowledgecase/questionDetails'),
                meta: { title: '问题详情', hidden: true, keepAlive: false, icon: 'smile', permission: ['knowindex'] }
              }
            ]
          },
          {
            path: '/case',
            name: 'case',
            hideChildrenInMenu: true,
            redirect: '/case/caseList',
            component: () => import('@/views/case/caseList'),
            meta: { title: '招商案例', icon: 'smile', hideHeader: true, keepAlive: false, permission: ['case'] },
            children: [
              {
                path: '/case/caseList',
                name: 'caseList',
                component: () => import('@/views/case/caseList'),
                meta: { title: '案例库', hidden: true, keepAlive: false, icon: 'smile', permission: ['case'] }
              },
              {
                path: '/case/caseInfo',
                name: 'caseInfo',
                component: () => import('@/views/case/caseInfo'),
                meta: { title: '案例详情', hidden: true, keepAlive: false, icon: 'smile', permission: ['case'] }
              },
              {
                path: '/case/addCase',
                name: 'addCase',
                component: () => import('@/views/case/addCase'),
                meta: { title: '发布案例', hidden: true, keepAlive: false, icon: 'smile', permission: ['case'] }
              }
            ]
          }
        ]
      },
      {
        path: '/ranklist',
        name: 'ranklist',
        redirect: '/ranklist/wangwangList',
        component: RouteView,
        meta: { title: '榜单排行', keepAlive: true, icon: 'smile', permission: ['ranklist'] },
        children: [
          {
            path: '/ranklist/wangwangList',
            name: 'wangwangList',
            component: () => import('@/views/ranklist/wangwangList'),
            meta: { title: '旺旺沟通排行', icon: 'smile', keepAlive: true, permission: ['wangwangList'] }
          },
          {
            path: '/ranklist/groupRank',
            name: 'groupRank',
            component: () => import('@/views/ranklist/groupRank'),
            meta: { title: '小组业绩排行', icon: 'smile', keepAlive: false, permission: ['groupRank'] }
          },
          {
            path: '/ranklist/darkHorse',
            name: 'darkHorse',
            component: () => import('@/views/ranklist/darkHorse'),
            meta: { title: '新人黑马榜单', icon: 'smile', keepAlive: false, permission: ['darkHorse'] }
          }
        ]
      },
      {
        path: '/teammanage',
        name: 'teammanage',
        redirect: '/teammanage/headline',
        component: RouteView,
        meta: { title: '小组管理', keepAlive: true, icon: 'smile', permission: ['teammanage'] },
        children: [
          {
            path: '/teammanage/headline',
            name: 'headline',
            component: () => import('@/views/teammanage/headline'),
            meta: { title: '活动标题', icon: 'smile', keepAlive: true, permission: ['headline'] }
          },
          {
            path: '/teammanage/ordered',
            name: 'ordered',
            component: () => import('@/views/teammanage/ordered'),
            meta: { title: '招商商品', icon: 'smile', keepAlive: true, permission: ['ordered'] }
          },
          {
            path: '/teammanage/passGoods',
            name: 'passGoods',
            component: () => import('@/views/teammanage/passGoods'),
            meta: { title: '通过商品', icon: 'smile', keepAlive: true, permission: ['passGoods'] }
          },
          {
            path: '/teammanage/issueResults',
            name: 'issueResults',
            component: () => import('@/views/teammanage/issueResults'),
            meta: { title: '出单业绩', icon: 'smile', keepAlive: true, permission: ['issueResults'] }
          },
          {
            path: '/teammanage/crewActivity',
            name: 'crewActivity',
            component: () => import('@/views/teammanage/crewActivity'),
            meta: { title: '组员活动', icon: 'smile', keepAlive: true, permission: ['crewActivity'] }
          },
          {
            path: '/teammanage/dimission',
            name: 'dimission',
            component: () => import('@/views/crewmanage/dimission'),
            meta: { title: '组员管理', icon: 'smile', keepAlive: true, permission: ['dimission'] }
          },
          {
            path: '/teammanage/crewDoffset',
            name: 'crewDoffset',
            component: () => import('@/views/crewmanage/crewDoffset'),
            meta: { title: '组员报销', icon: 'smile', keepAlive: true, permission: ['crewDoffset'] }
          }
        ]
      },
      {
        path: '/helpcenter',
        name: 'helpcenter',
        redirect: '/helpcenter/dimission',
        component: RouteView,
        meta: { title: '帮助中心', keepAlive: false, icon: 'smile', permission: ['helpcenter'] },
        children: [
          {
            path: '/helpcenter/article',
            name: 'article',
            component: () => import('@/views/helpcenter/article'),
            meta: { title: '文章中心', icon: 'smile', keepAlive: false, permission: ['article'] }
          },
          {
            path: '/helpcenter/articleManage',
            name: 'articleManage',
            hideChildrenInMenu: true,
            component: () => import('@/views/helpcenter/articleManage'),
            meta: { title: '文章管理', icon: 'smile', hideHeader: true, keepAlive: false, permission: ['articleManage'] },
            children: [
              {
                path: '/helpcenter/articleManage/pubArticle',
                name: 'pubArticle',
                component: () => import('@/views/helpcenter/pubArticle'),
                meta: { title: '发布文章', icon: 'smile', hidden: true, keepAlive: false, permission: ['articleManage'] }
              }]
          },
          {
            path: '/helpcenter/periphery',
            name: 'periphery',
            component: () => import('@/views/helpcenter/periphery'),
            meta: { title: '周边工具', icon: 'smile', keepAlive: false, permission: ['periphery'] }
          },
          {
            path: '/helpcenter/toolManage',
            name: 'toolManage',
            component: () => import('@/views/helpcenter/toolManage'),
            meta: { title: '工具管理', icon: 'smile', keepAlive: false, permission: ['toolManage'] }
          }
        ]
      },
      {
        path: '/mycenter',
        name: 'mycenter',
        redirect: '/mycenter/message',
        component: RouteView,
        meta: { title: '个人中心', keepAlive: false, icon: 'smile', permission: ['mycenter'] },
        children: [
          {
            path: '/mycenter/message',
            name: 'message',
            component: () => import('@/views/mycenter/message'),
            meta: { title: '消息通知', icon: 'smile', keepAlive: false, permission: ['message'] }
          },
          {
            path: '/mycenter/informMange',
            name: 'informMange',
            component: () => import('@/views/mycenter/informMange'),
            meta: { title: '通知管理', icon: 'smile', keepAlive: false, permission: ['informMange'] }
          },
          {
            path: '/mycenter/mySetting',
            name: 'mySetting',
            component: () => import('@/views/mycenter/mySetting'),
            meta: { title: '个人设置', icon: 'smile', keepAlive: false, permission: ['mySetting'] }
          }
        ]
      },
      {
        path: '/permission',
        name: 'permission',
        redirect: '/permission/authorization',
        component: RouteView,
        meta: { title: '权限设置', keepAlive: false, icon: 'smile', permission: ['permission'] },
        children: [
          {
            path: '/permission/authorization',
            name: 'authorization',
            component: () => import('@/views/permission/authorization'),
            meta: { title: '权限设置', icon: 'smile', keepAlive: false, permission: ['authorization'] }
          }
        ]
      },
      {
        path: '/gather',
        name: 'gather',
        redirect: '/gather/gatherEnter',
        component: RouteView,
        meta: { title: '采集管理', keepAlive: false, icon: 'smile', permission: ['mycenter'] },
        children: [
          {
            path: '/gather/gatherEnter',
            name: 'gatherEnter',
            component: () => import('@/views/gather/gatherEnter'),
            meta: { title: '商品录入', icon: 'smile', keepAlive: false, permission: ['mycenter'] }
          },
          {
            path: '/gather/manageGather',
            name: 'manageGather',
            hideChildrenInMenu: true,
            component: () => import('@/views/gather/manageGather'),
            meta: { title: '商品管理', icon: 'smile', hideHeader: true, keepAlive: false, permission: ['mycenter'] },
            children: [
              {
                path: '/gather/manageGather/gatherInfo',
                name: 'gatherInfo',
                component: () => import('@/views/gather/gatherInfo'),
                meta: { title: '商品详情', icon: 'smile', hidden: true, keepAlive: false, permission: ['mycenter'] }
              }]
          },
          {
            path: '/gather/disposeGather',
            name: 'disposeGather',
            hideChildrenInMenu: true,
            component: () => import('@/views/gather/disposeGather'),
            meta: { title: '处理采集商品', icon: 'smile', hideHeader: true, keepAlive: false, permission: ['mycenter'] },
            children: [
              {
                path: '/gather/disposeGather/disposeInfo',
                name: 'disposeInfo',
                component: () => import('@/views/gather/disposeInfo'),
                meta: { title: '商品详情', icon: 'smile', hidden: true, keepAlive: false, permission: ['mycenter'] }
              }]
          },
          {
            path: '/gather/financeDispose',
            name: 'financeDispose',
            hideChildrenInMenu: true,
            component: () => import('@/views/gather/financeDispose'),
            meta: { title: '财务处理', icon: 'smile', hideHeader: true, keepAlive: false, permission: ['mycenter'] },
            children: [
              {
                path: '/gather/financeDispose/financeInfo',
                name: 'financeInfo',
                component: () => import('@/views/gather/financeInfo'),
                meta: { title: '财务详情', icon: 'smile', hidden: true, keepAlive: false, permission: ['mycenter'] }
              }]
          }
        ]
      },
      {
        path: '/admin/staff',
        name: 'staff',
        redirect: '/admin/staff/staffAudit',
        component: RouteView,
        meta: { title: '员工审核', keepAlive: false, icon: 'smile', permission: ['mycenter'] },
        children: [
          {
            path: '/admin/staff/staffAudit',
            name: 'staffAudit',
            component: () => import('@/views/admin/staff/staffAudit'),
            meta: { title: '员工审核', icon: 'smile', keepAlive: false, permission: ['mycenter'] }
          },
          {
            path: '/admin/staff/dimission',
            name: 'dimissionData',
            component: () => import('@/views/admin/staff/dimission'),
            meta: { title: '离职数据', icon: 'smile', keepAlive: false, permission: ['mycenter'] }
          },
          {
            path: '/admin/staff/staffRank',
            name: 'staffRanks',
            component: () => import('@/views/admin/staff/staffRank'),
            meta: { title: '员工排行', icon: 'smile', keepAlive: false, permission: ['mycenter'] }
          },
          {
            path: '/admin/staff/contact',
            name: 'contact',
            component: () => import('@/views/admin/staff/contact'),
            meta: { title: '联系方式', icon: 'smile', keepAlive: false, permission: ['mycenter'] }
          },
          {
            path: '/admin/staff/communication',
            name: 'communication',
            component: () => import('@/views/admin/staff/communication'),
            meta: { title: '沟通效果', icon: 'smile', keepAlive: false, permission: ['mycenter'] }
          }
        ]
      },
      {
        path: '/admin/investment',
        name: 'staff',
        redirect: '/admin/investment/staffAudit',
        component: RouteView,
        meta: { title: '招商管理', keepAlive: false, icon: 'smile', permission: ['mycenter'] },
        children: [
          {
            path: '/admin/investment/activity',
            name: 'invasActivity',
            component: () => import('@/views/admin/investment/activity'),
            meta: { title: '活动列表', icon: 'smile', keepAlive: false, permission: ['mycenter'] }
          },
          {
            path: '/admin/investment/goods',
            name: 'invasGoods',
            component: () => import('@/views/admin/investment/goods'),
            meta: { title: '商品列表', icon: 'smile', keepAlive: false, permission: ['mycenter'] }
          },
          {
            path: '/admin/investment/order',
            name: 'invasOrder',
            component: () => import('@/views/admin/investment/order'),
            meta: { title: '订单列表', icon: 'smile', keepAlive: false, permission: ['mycenter'] }
          }
        ]
      },
      {
        path: '/admin/skipper',
        name: 'skipper',
        redirect: '/admin/skipper/statistics',
        component: RouteView,
        meta: { title: '跑单管理', keepAlive: false, icon: 'smile', permission: ['mycenter'] },
        children: [
          {
            path: '/admin/skipper/statistics',
            name: 'statistics',
            component: () => import('@/views/admin/skipper/statistics'),
            meta: { title: '统计概括', icon: 'smile', keepAlive: false, permission: ['mycenter'] }
          },
          {
            path: '/admin/skipper/paoGoods',
            name: 'paoGoods',
            component: () => import('@/views/admin/skipper/paoGoods'),
            meta: { title: '跑单商品', icon: 'smile', keepAlive: false, permission: ['mycenter'] }
          }
        ]
      },
      {
        path: '/admin/system',
        name: 'system',
        redirect: '/admin/system/dan',
        component: RouteView,
        meta: { title: '系统设置', keepAlive: false, icon: 'smile', permission: ['mycenter'] },
        children: [
          {
            path: '/admin/system/dan',
            name: 'dan',
            component: () => import('@/views/admin/system/dan'),
            meta: { title: '段位管理', icon: 'smile', keepAlive: false, permission: ['mycenter'] }
          },
          {
            path: '/admin/system/site',
            name: 'site',
            component: () => import('@/views/admin/system/site'),
            meta: { title: '站点信息', icon: 'smile', keepAlive: false, permission: ['mycenter'] }
          }
        ]
      }
    ]
  },
  {
    path: '*',
    redirect:
      '/404',
    hidden:
      true
  }
]

/**
 * 基础路由
 * @type { *[] }
 */
export const constantRouterMap = [
  {
    path: '/user',
    component: UserLayout,
    redirect: '/user/login',
    hidden: true,
    children: [
      {
        path: 'login',
        name: 'login',
        component: () => import(/* webpackChunkName: "user" */ '@/views/user/Login')
      },
      {
        path: 'register',
        name: 'register',
        component: () => import(/* webpackChunkName: "user" */ '@/views/user/Register')
      },
      {
        path: 'register-result',
        name: 'registerResult',
        component: () => import(/* webpackChunkName: "user" */ '@/views/user/RegisterResult')
      },
      {
        path: 'recover',
        name: 'recover',
        component: () => import(/* webpackChunkName: "user" */ '@/views/user/Recover')
      }
    ]
  },

  {
    path: '/404',
    component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404')
  }
]
